#ifndef FAST_LOG_H_
#define FAST_LOG_H_

#define LOG_EMERG     0  /* System is unusable */
#define LOG_ALERT     1  /* Action must be taken immediately */
#define LOG_CRIT      2  /* Critical conditions */
#define LOG_ERR       3  /* Error conditions */
#define LOG_WARNING   4  /* Warning conditions */
#define LOG_NOTICE    5  /* Normal, but significant, condition */
#define LOG_INFO      6  /* Informational message */
#define LOG_DEBUG     7  /* Debug-level message */

#define time_before(a,b) ((a) - (b) >= (1 << 30))

typedef void (*dump_fun)(int prio, const char *fmt, ...);

int fastlog(int prio, const char *fmt, ...);
int fastlog_dump(dump_fun pfun, ...);

/* 以下函数由demo提供 */
typedef unsigned long irqstate_t;
irqstate_t enter_critical_section(void);
void leave_critical_section(irqstate_t flags);
unsigned long get_sys_tick(void);

#endif // FAST_LOG_H_

